﻿@model App.Web.ViewModels.UtilityModels.ListConfig 
@using App.Web.ViewModels.UtilityModels;
@using App.Web.Utility
@{
    bool _IsReceive = String.Compare(ViewData[AppConstants.ViewDataKeys.SUB_MODEL] as String, "Receive", true) == 0 ? true : false;
    ListConfig _Config = ListConfigBuilder.Build(
                @"Basic Information{ Date | Store }, 
                Details Information{ ReferenceNo | Description}",
                Model.DataSource, true, "/Private/Inventory/Receive/{0}");
                
    String pageTitle = "My Favourite Products";

    ViewBag.Title = Html.GetPageTitle(pageTitle);
    PagerConfig _PagerConfig = Model.Pager;
    ViewBag.DataSource = Model.DataSource;
    _PagerConfig.UrlFormat = "/private/favorites?id={0}";
}

@*<div class="page-heading">
    <h1>@pageTitle</h1>
    <div>
        Manage your own favorite list. You can add or remove any product from your favorite list.
    </div>
</div>*@
@*<div class="GroupBox">*@
    <div>
        @if(_IsReceive){
            @Html.PrivateLink("New Receive", "Receive", "Inventory")
        }
        else {
            @Html.PrivateLink("New Issue", "Issue", "Inventory")
        }
    </div>
    @Html.Partial("_ListView", _Config)
    @if (_PagerConfig != null)
    {    
        @Html.Partial("_Pager", _PagerConfig)
    }
@*</div>*@
